package com.chhuang.system.po;

import java.io.Serializable;
import com.chhuang.core.model.AbstractPersistentModel;
import com.chhuang.core.validation.ValidGroupSave;
import com.chhuang.core.validation.ValidGroupUpdate;
import com.sun.xml.bind.CycleRecoverable;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.*;

/**
* ChRoleMenuMap Model
* @author ChHuang
* @date Thu Mar 09 09:01:29 CST 2017
*/
public class ChRoleMenuMap extends AbstractPersistentModel implements CycleRecoverable{
	private static final long serialVersionUID = 6649163494725823913L;
	@NotNull(message="{ChRoleMenuMap.roleMenuMapId.NotNull}",groups={ValidGroupUpdate.class})
	@Size(max=32,message="{ChRoleMenuMap.roleMenuMapId.Size}",groups={ValidGroupSave.class})
	private String roleMenuMapId;
	public String getRoleMenuMapId(){
		return roleMenuMapId;
	}
	public void setRoleMenuMapId(String roleMenuMapId){
		this.roleMenuMapId=roleMenuMapId;
	}
	@Size(max=32,message="{ChRoleMenuMap.roleId.Size}",groups={ValidGroupSave.class})
	private String roleId;
	public String getRoleId(){
		return roleId;
	}
	public void setRoleId(String roleId){
		this.roleId=roleId;
	}
	@Size(max=32,message="{ChRoleMenuMap.menuId.Size}",groups={ValidGroupSave.class})
	private String menuId;
	public String getMenuId(){
		return menuId;
	}
	public void setMenuId(String menuId){
		this.menuId=menuId;
	}
	private Integer menuOrder;
	public Integer getMenuOrder(){
		return menuOrder;
	}
	public void setMenuOrder(Integer menuOrder){
		this.menuOrder=menuOrder;
	}
	private Integer roleOrder;
	public Integer getRoleOrder(){
		return roleOrder;
	}
	public void setRoleOrder(Integer roleOrder){
		this.roleOrder=roleOrder;
	}
	@Override
	public Serializable getId() {
		return getRoleMenuMapId();
	}
	@Override
	public void setId(Serializable id) {
		setRoleMenuMapId((String)id);
	}
	@Override
	public Object onCycleDetected(Context arg0) {
		ChRoleMenuMap temp=new ChRoleMenuMap();
		temp.setRoleMenuMapId(roleMenuMapId);
		return temp;
	}
	@Override
	public String toString() {
		return "ChRoleMenuMap [roleMenuMapId="+roleMenuMapId+",roleId="+roleId+",menuId="+menuId+",menuOrder="+menuOrder+",roleOrder="+roleOrder+"]";
	}
}